package com.yunxin.admin.system.domain.model.dict;

import java.util.Collection;

/**
 * @author zero°
 * @since 2023-07-11
 */
public interface DictRepository {

    /**
     * 保存字典
     * @param dict dict
     * @return boolean
     */
    boolean saveDict(Dict dict);


    /**
     * 更新字典
     * @param dict dict
     * @return boolean
     */
    boolean updateDict(Dict dict);

    /**
     * 根据id集合删除
     * @param ids ids
     * @return boolean
     */
    boolean removeByIdList(Collection<Long> ids);

    /**
     * 根据字典code更新字典code
     * @param oldCode oldCode
     * @param newCode newCode
     * @return boolean
     */
    boolean updateDictCode(String oldCode, String newCode);

    /**
     * 根据字典类型code删除数据
     * @param dictTypeCodes dictTypeCodes
     * @return boolean
     */
    boolean removeByTypeCodes(Collection<String> dictTypeCodes);

}
